import re
fireCall=re.match('(\w\w\w\w):(\d\d\d)','fire:119')
print(fireCall.group())        #输出fire:119
print(fireCall.group(1))       #输出fire
print(fireCall.group(2))       #输出119
print(fireCall.groups())       #输出('fire', '119')
m=re.match('(a(b))','ab') 
print(m.groups())            #输出('ab', 'b')
